/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-02-17
*/
package com.rzico.basics.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.rzico.annotation.IgnoreSwaggerParameter;
import io.swagger.models.auth.In;
import lombok.Data;
import java.util.Date;
import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty;

/**
 * <pre>
 *   会员数据库对象
 * </pre>
 * @author Rzico Boot
 * @version 1.0
 */
@Data
@JsonIgnoreProperties(value = {"handler"})
@Table(name = "wx_shop")
public class Shop {

    @ApiModelProperty(value = "")
    @Id
    protected Long id;

    @ApiModelProperty(value = "创建日期")
    protected java.util.Date createDate;

    @ApiModelProperty(value = "修改日期")
    protected java.util.Date modifyDate;

    @ApiModelProperty(value = "企业名称")
    protected String name;

    @ApiModelProperty(value = "")
    protected Integer areaId;

    @ApiModelProperty(value = "所在地")
    protected String areaName;

    @ApiModelProperty(value = "地址")
    protected String address;

    @ApiModelProperty(value = "联系人")
    protected String linkman;

    @ApiModelProperty(value = "联系电话")
    protected String telephone;

    @ApiModelProperty(value = "是否删除")
    @JsonIgnore
    protected Boolean deleted;

    @ApiModelProperty(value = "")
    protected Long enterpriseId;

    @ApiModelProperty(value = "伟度")
    protected Double lat;

    @ApiModelProperty(value = "经度")
    protected Double lng;

    @ApiModelProperty(value = "状态 {0:待审核,1:已审核,2:已关闭}")
    protected Integer status;

    @ApiModelProperty(value = "")
    protected Integer orders;

    @ApiModelProperty(value = "类型 {0:店铺,1:提货点,2:仓库}")
    protected Integer type;

    @ApiModelProperty(value = "打印机密码")
    protected String printerp;

    @ApiModelProperty(value = "打印机账号")
    protected String printeru;

    @ApiModelProperty(value = "所属部门")
    protected String officeId;

    @ApiModelProperty(value = "店长(针对门店生效)")
    protected String managerId;

    @ApiModelProperty(value = "团长(针对提货点生效)")
    protected Long memberId;

    @ApiModelProperty(value = "创建者")
    @JsonIgnore
    protected String createBy;

    @ApiModelProperty(value = "更新者")
    @JsonIgnore
    protected String modifyBy;

    @ApiModelProperty(value = "供应商id")
    protected Long supplierId;

    /**
     *  供应商
     */
    @JsonIgnore
    @IgnoreSwaggerParameter
    protected Supplier supplier;

    @ApiModelProperty(value = "供应商名称", hidden = true)
    public String getSupplierName(){
        Supplier supplier = getSupplier();
        if (null != supplier){
            return supplier.getName();
        }else{
            return "";
        }
    }

    public void setSupplierName(String value) {

    }

}
